package order;

import pizza.BJCheesePizza;
import pizza.BJPepperPizza;
import pizza.Pizza;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: fzykd
 * Date: 2023-03-15
 * Time: 20:10
 */

//创建的北京工厂类
public class BJFactory implements AbsFactory{

    @Override
    public Pizza createPizza(String orderType) {
        System.out.println("使用的抽象工厂模式创建的pizza");
        //创建Pizza
        Pizza pizza = null;
        if (orderType.equals("cheese")){
            pizza = new BJCheesePizza();
        }else if (orderType.equals("pepper")){
            pizza = new BJPepperPizza();
        }else {
            System.out.println("没有创建的披萨");
        }
        return pizza;
    }
}
